/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#ifndef DEF_JIT

#include "../结构数据.h"
#include <矩阵.h>
#include "引擎数据类型.h"

#else

//typedef struct vec3;
//typedef struct vec4;

#endif // !DEF_JIT



//S_F32Array* f_f32_array_alloc();
//void f_f32_array_free(S_F32Array* a);

S_Vec3Array* f_vec3_array_alloc(uint64 num);
//void f_vec3_array_free(S_Vec3Array* a);

//S_Vec3Array* f_vec3_array_alloc(uint64 num);
//void f_vec3_array_free(S_Vec3Array* a);

S_F32Array* f_f32_array_过度函数_从CXX_alloc(void* data);
S_F32Array* f_f32_array_fromF32_alloc(float32 data);
S_F32Array* f_f32_array_fromI32_alloc(S_I32Array* data);

S_Vec2Array* f_vec2_array_fromV_alloc(float32* data);
S_Vec2Array* f_vec2_array_fromV3s_alloc(S_Vec3Array* data);

//S_iVec2Array* f_ivec2_array_fromV_alloc(float32* data);
//S_iVec2Array* f_ivec2_array_fromV3s_alloc(S_Vec3Array* data);


S_Vec3Array* f_vec3_array_过度函数_从CXX_alloc(void* data);
S_Vec3Array* f_vec3_array_fromV3_alloc(vec3 data);
S_Vec3Array* f_vec3_array_fromV4_alloc(vec4 data);


S_Vec4Array* f_vec4_array_fromV3_alloc(vec3 data);
S_Vec4Array* f_vec4_array_fromV4_alloc(vec4 data);
S_Vec4Array* f_vec4_array_fromV3s_alloc(S_Vec3Array* data);

Mat44f			f_Mat44_array_formMat44Array(S_Mat44Array* mats);
S_Mat44Array*	f_Mat44_array_fromMat44_alloc(const Mat44f& data);
S_Mat44Array*	f_Mat44_array_fromMat44_alloc_过度函数(void* data);


S_边Array* f_Edge1D_array_fromEdge_alloc(S_边* data);


void f_f32_array_步进(S_F32Array* a, const vec2& r);
void f_f32_array_随机(S_F32Array* a, const vec2& r, bool 覆盖);



S_ElementSelect*      f_array_元素选择_alloc();
S_ElementSelectArray* f_array_元素选择数组_alloc();
void                  f_array_元素选择数组_resize(S_ElementSelectArray* es, uint32 num);






//#define DEF_Vec3